import 'package:flutter/material.dart';

import 'myFont.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      theme: ThemeData(
          colorScheme: const ColorScheme(
              primary: Colors.black,
              surfaceVariant: Colors.white,
              secondary: Colors.green,
              background: Colors.white, //整个页面背景色
              error: Colors.red,
              brightness: Brightness.light,
              onBackground: Colors.white,
              outlineVariant: Colors.white,
              onError: Colors.yellow,
              onPrimary: Colors.white,
              onSecondary: Colors.white,
              onSurface: Color.fromARGB(255, 233, 233, 240),
              surface: Color.fromARGB(255, 17, 0, 255)) //整个标题栏颜色
          // primarySwatch: Colors.blue, // 设置主色调,无效，怎么设都是白色
          ),
      home: Scaffold(
        appBar: AppBar(title: const Text("图标"), centerTitle: true),
        body: const MyHomePage(),
      ),
    );
  }
}

class MyHomePage extends StatelessWidget {
  const MyHomePage({super.key});

  @override
  Widget build(BuildContext context) {
    return ListView(
      padding: const EdgeInsets.all(10),
      children: <Widget>[
        ListTile(
          leading: Image.network("https://www.itying.com/images/flutter/1.png"),
          title: const Text("国铁集团:保障重点物资运输新华述评研讨会举行",
              style: TextStyle(color: Colors.black, fontSize: 15)),
          subtitle: const Text(
              "7月30日，在“学习贯彻习近平经济思想暨全面塑造高质量发展新优势“研讨会上，从习近平经济思想的理论逻辑、实践逻辑和历史逻辑到天津全面塑造高质量发展，",
              style: TextStyle(color: Colors.grey, fontSize: 12)),
          trailing: const Icon(Icons.arrow_right_rounded),
        ),
        const Divider(),
        ListTile(
          leading: Image.network("https://www.itying.com/images/flutter/1.png"),
          title: const Text("国铁集团:保障重点物资运输新华述评研讨会举行",
              style: TextStyle(color: Colors.black, fontSize: 15)),
          subtitle: const Text(
              "7月31日，在“学习贯彻习近平经济思想暨全面塑造高质量发展新优势“研讨会上，从习近平经济思想的理论逻辑、实践逻辑和历史逻辑到天津全面塑造高质量发展，",
              style: TextStyle(color: Colors.grey, fontSize: 12)),
          trailing: const Icon(MyFont.eat,
              size: 40, color: Color.fromARGB(255, 71, 220, 57)),
        ),
        const Divider(),
        ListTile(
          leading: Image.network("https://www.itying.com/images/flutter/1.png"),
          title: const Text("国铁集团:保障重点物资运输新华述评研讨会举行",
              style: TextStyle(color: Colors.black, fontSize: 15)),
          subtitle: const Text(
              "8月1日，在“学习贯彻习近平经济思想暨全面塑造高质量发展新优势“研讨会上，从习近平经济思想的理论逻辑、实践逻辑和历史逻辑到天津全面塑造高质量发展，",
              style: TextStyle(color: Colors.grey, fontSize: 12)),
          trailing:
              Image.network("https://www.itying.com/images/flutter/3.png"),
        ),
        const Divider(),
        ListTile(
          leading: Image.network("https://www.itying.com/images/flutter/3.png"),
          title: const Text("国铁集团:保障重点物资运输新华述评研讨会举行",
              style: TextStyle(color: Colors.black, fontSize: 15)),
          subtitle: const Text(
              "8月2日，在“学习贯彻习近平经济思想暨全面塑造高质量发展新优势“研讨会上，从习近平经济思想的理论逻辑、实践逻辑和历史逻辑到天津全面塑造高质量发展，",
              style: TextStyle(color: Colors.grey, fontSize: 12)),
        ),
        const Divider(),
      ],
    );
  }
}
